/*
  Name: DeadProxyClientSendQueue.h
  Copyright:
  Author: Carl Chatfield
  Date: 19/01/08 20:47
  Description: Queues Packets to be sent to prevent spamming the game server
*/


#ifndef __DEADPROXYFRMCLIENTSENDQUEUE_h__
#define __DEADPROXYFRMCLIENTSENDQUEUE_h__

#ifdef __BORLANDC__
	#pragma hdrstop
#endif

#ifndef WX_PRECOMP
	#include <wx/wx.h>
#else
	#include <wx/wxprec.h>
#endif
#include "windows.h"
#include "winsock.h"
#include "DeadProxyPacketBuffer.h"
#include "DeadProxyPacketQueue.h"

class SendQueue : public wxThread
{
    private:
        wxCondition * SendCondition;
        wxCondition * PacketCondition;
        PacketQueue * Queue;
        SOCKET ToServerSocket; //We only need to control the flow of packets to the server
	public:
        virtual void * Entry();
        virtual void OnExit();
        SendQueue(PacketQueue * Que, wxCondition* SendCond, wxCondition* PacketCond, SOCKET ToServSock);
};

#endif
